package com.lyshop.jinding.adapters;

import android.content.Context;
import android.widget.TextView;


import com.lyshop.jinding.R;
import com.lyshop.jinding.base.BaseRVAdapter;
import com.lyshop.jinding.base.BaseRVHolder;
import com.lyshop.jinding.bean.EXPRecordBean;

import java.util.List;

public class EXPRecordAdapter extends BaseRVAdapter {

    public EXPRecordAdapter(Context context, List list) {
        super(context, list);
    }

    @Override
    public int onCreateViewLayoutID(int viewType) {
        return R.layout.item_exp_record;
    }

    @Override
    public void onBindView(BaseRVHolder holder, int position) {
        TextView title_tv = holder.getViewHolder().get(R.id.title_tv);
        TextView time_tv = holder.getViewHolder().get(R.id.time_tv);
        TextView exp_tv = holder.getViewHolder().get(R.id.exp_tv);

        EXPRecordBean bean = (EXPRecordBean)mList.get(position);
        title_tv.setText(bean.getRemark());
        time_tv.setText(bean.getAdd_time_str());
        exp_tv.setText("+"+bean.getIntegral_num());
    }
}
